<template>
  <div>
    <h1>成绩</h1>
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="title">
        <el-input v-model="form.title"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="onSubmit" type="primary">post lesson</el-button>
        <el-button @click="onSubmit2" type="primary">post lessonlist</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: { title: '' }
    }
  },
  methods: {
    async onSubmit() {
      const { data } = await this.$axios.post('/api/lesson/', this.form)
      console.log(data)
    },
    async onSubmit2() {
      const { data } = await this.$axios.post('/api/lessonlist/', this.form)
      console.log(data)
    }
  }
}
</script>
